package Vo
{
	import Control.BroadMessageCenter;
	import Control.LoaderAssetsEvent;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;

	public class Image extends Sprite
	{
		public var ImageName:String="";
		public var ImageUrl:String;
		public function Image(_url:String)
		{
			changeBitmap(_url);
		}
		public function changeBitmap(url:String):void
		{
			if(url=="")
			{
				return;
			}
			else
			{
				getbitmapByUrl(url);
			}
		}
		private function getbitmapByUrl(_url:String):void
		{
			var load:Loader=new Loader();
			load.load(new URLRequest(_url));
			load.contentLoaderInfo.addEventListener(Event.COMPLETE,function():void{
				load.width=370;
				load.height=350;
				load.x=50;
				load.y=70;
				this.height=load.height;
				addChild(load as DisplayObject);
			},false,0,true);
		}
	}
}